#pragma once
#include <stdint.h>
#define DATATCLASS_LENGTH 	(1472)
#define CTL_LENGTH			(4)
#define TYPE_LENGTH 		(4)
#define LENGTHTOTAL_LENGTH	(24)
#define NUMBER_LENGTH		(16)
#define LENGTHDATA_LENGTH	(16)
#define DATA_LENGTH			(DATATCLASS_LENGTH-8)

typedef struct text_s
{
	uint64_t ctl : CTL_LENGTH;
	uint64_t type : TYPE_LENGTH;
	uint64_t length_total : LENGTHTOTAL_LENGTH;
	uint64_t number : NUMBER_LENGTH;
	uint64_t length_data : LENGTHDATA_LENGTH;
	uint8_t data[DATA_LENGTH];
}text_t;

typedef class data_s
{
public:
	data_s(const uint8_t data[DATATCLASS_LENGTH]);
	data_s(const text_t& text);
	
private:
	uint8_t GET_L_BYTE(int index);
	uint8_t GET_H_BYTE(int index);
	uint8_t GET_1_BYTE(int index);
	uint16_t GET_2_BYTE(int index);
	uint32_t GET_4_BYTE(int index);
	uint64_t GET_8_BYTE(int index);
	text_t text;
	uint8_t data[DATATCLASS_LENGTH]
}data_t;

